package api_day11;

public class RunDemo implements Runnable{
    private int id;
    private static int init = 0;

    public RunDemo() {
        id = ++init;
    }

    @Override
    public void run() {
//        System.out.println("这是线程" + id);
        for (int i = 0; i < 10; i++) {
            Thread thread = Thread.currentThread();
            String name = thread.getName();
            System.out.println(name + " : " + i);
        }
    }
}
